﻿#region

using System.Collections.Generic;
using BusinessObjects;
using DataAccessLayer;

#endregion

namespace BusinessLogicLayer
{
    public static class Booking_Vehicle_DriverBLL
    {
        /// <summary>
        ///     Allocate driver and vehicle for a booking
        /// </summary>
        /// <param name="bookingId">Represent's the booking Id</param>
        /// <param name="vehicleRegNo">Represent's the vehicle registration number</param>
        /// <param name="driverId">Represent's the driver's Id</param>
        public static void AllocateVehicleAndDriver(int bookingId, string vehicleRegNo, int driverId)
        {
            Booking_Vehicle_Driver bvd = new Booking_Vehicle_Driver
            {
                BookingId = bookingId,
                VehicleRegistrationNo = vehicleRegNo,
                DriverId = driverId
            };

            Booking_Vehicle_DriverDAL.AllocateVehicleAndDriver(bvd);
        }

        /// <summary>
        ///     Get vehicle and driver details by booking id
        /// </summary>
        /// <param name="bookingId">Represent's the booking Id</param>
        /// <returns>Booking_Vehicle_Driver</returns>
        public static List<Booking_Vehicle_Driver> GetVehicleAndDriverDetailsByBookingId(int bookingId)
        {
            return Booking_Vehicle_DriverDAL.GetVehicleAndDriverDetailsByBookingId(bookingId);
        }
    }
}